package com.woniuxy.controller;

import com.woniuxy.entity.DoctorAdvice;
import com.woniuxy.service.DoctorAdviceService;
import com.woniuxy.util.ResponseData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/doctoradvice")
public class DoctorAdviceController {
    @Autowired
    DoctorAdviceService doctorAdviceService;

    @GetMapping("/querydo/{patId}")
    public ResponseData queryDo(@PathVariable Integer patId){
        return doctorAdviceService.queryByDoCaseId(patId);
    }

    @GetMapping("/updatenurid/{id}")
    public ResponseData updateNurId(@PathVariable Integer id){
        return doctorAdviceService.updateNurId(id);
    }

    @PostMapping("/addDocAd")
    public ResponseData<?> addDocAd(@RequestBody DoctorAdvice doctorAdvice){
        return doctorAdviceService.addDocAd(doctorAdvice);
    }

}
